package cn.school.web.controller.client;

import cn.school.common.core.controller.BaseController;
import cn.school.system.service.pay.WxPayService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @author zsj
 * @version 1.0
 * @date 2023/12/5 9:31
 * @desc
 **/
@Slf4j
@RestController
@RequestMapping(value = "/h5/pay")
public class H5PayController extends BaseController {
    @Autowired
    private HttpServletRequest request;
    @Autowired
    private WxPayService wxPayService;

    @PostMapping("/payNotify")
    public String payNotify(@RequestBody String requestBody) throws Exception{
        return wxPayService.payNotify(request,requestBody);
    }
}
